package CSDN;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 王圆豪
 * Date: 2025-04-27
 * Time: 13:38
 */
class MyThread  extends Thread{
    @Override
    public void run(){
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println("Hello thread!");
    }
}

public class Test1{
    public static void main(String[] args){
        Thread thread = new MyThread();
//        thread.start();
        thread.run();
        System.out.println("Hello main!");
    }
}
